package com.dyzx.hbb.modules.fcxs.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

/**
 * 线索表实体类
 * 
 * 功能说明：存储汽车销售线索的基本信息，包括客户信息、需求信息、状态等
 * 使用场景：汽车销售线索的管理、跟踪和转化过程
 * 
 * @author 开发团队
 * @version 1.0.0
 * @since 2025-05-17
 * @TableName fcxs_clue
 */
@TableName(value ="fcxs_clue")
@Data
public class FcxsClue {
    /**
     * 编号
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 线索号 自动生成：XS+[年月]+[六位随机码]  案例：XS2501888888
     */
    private String clueNo;

    /**
     * 姓名
     */
    private String name;

    /**
     * 电话
     */
    private String phone;

    /**
     * 客户需求  字典信息：fcxs_clue_needs
     */
    private Integer customerNeeds;

    /**
     * 客户建议
     */
    private String customerSuggestions;

    /**
     * 已确认-姓名
     */
    private String cfmName;

    /**
     * 已确认-电话1
     */
    private String cfmPhone1;

    /**
     * 已确认-电话2
     */
    private String cfmPhone2;

    /**
     * 已确认-客户需求  字典信息：fcxs_clue_needs
     */
    private Integer cfmCustomerNeeds;

    /**
     * 年龄
     */
    private Integer age;

    /**
     * 性别  字典信息：sys_global_sex
     */
    private Integer sex;

    /**
     * 职业
     */
    private String occupation;

    /**
     * 等级 字典信息：fcxs_clue_level
     */
    private Integer level;

    /**
     * 确认日期
     */
    private Long cfmDate;

    /**
     * 备注
     */
    private String remark;

    /**
     * 状态 字典信息：fcxs_clue_status
     */
    private Integer status;

    /**
     * 创建日期（毫秒级时间戳）
     */
    @TableField(fill = FieldFill.INSERT)
    private Long createDate;

    /**
     * 更新日期（毫秒级时间戳）
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateDate;

    /**
     * 删除标志
     */
    private Integer deleted;

    /**
     * 操作用户编号
     */
    private Long operatorId;

    /**
     * 企业编号
     */
    private Long organId;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        FcxsClue other = (FcxsClue) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getClueNo() == null ? other.getClueNo() == null : this.getClueNo().equals(other.getClueNo()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
            && (this.getCustomerNeeds() == null ? other.getCustomerNeeds() == null : this.getCustomerNeeds().equals(other.getCustomerNeeds()))
            && (this.getCustomerSuggestions() == null ? other.getCustomerSuggestions() == null : this.getCustomerSuggestions().equals(other.getCustomerSuggestions()))
            && (this.getCfmName() == null ? other.getCfmName() == null : this.getCfmName().equals(other.getCfmName()))
            && (this.getCfmPhone1() == null ? other.getCfmPhone1() == null : this.getCfmPhone1().equals(other.getCfmPhone1()))
            && (this.getCfmPhone2() == null ? other.getCfmPhone2() == null : this.getCfmPhone2().equals(other.getCfmPhone2()))
            && (this.getCfmCustomerNeeds() == null ? other.getCfmCustomerNeeds() == null : this.getCfmCustomerNeeds().equals(other.getCfmCustomerNeeds()))
            && (this.getAge() == null ? other.getAge() == null : this.getAge().equals(other.getAge()))
            && (this.getSex() == null ? other.getSex() == null : this.getSex().equals(other.getSex()))
            && (this.getOccupation() == null ? other.getOccupation() == null : this.getOccupation().equals(other.getOccupation()))
            && (this.getLevel() == null ? other.getLevel() == null : this.getLevel().equals(other.getLevel()))
            && (this.getCfmDate() == null ? other.getCfmDate() == null : this.getCfmDate().equals(other.getCfmDate()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCreateDate() == null ? other.getCreateDate() == null : this.getCreateDate().equals(other.getCreateDate()))
            && (this.getUpdateDate() == null ? other.getUpdateDate() == null : this.getUpdateDate().equals(other.getUpdateDate()))
            && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()))
            && (this.getOperatorId() == null ? other.getOperatorId() == null : this.getOperatorId().equals(other.getOperatorId()))
            && (this.getOrganId() == null ? other.getOrganId() == null : this.getOrganId().equals(other.getOrganId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getClueNo() == null) ? 0 : getClueNo().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
        result = prime * result + ((getCustomerNeeds() == null) ? 0 : getCustomerNeeds().hashCode());
        result = prime * result + ((getCustomerSuggestions() == null) ? 0 : getCustomerSuggestions().hashCode());
        result = prime * result + ((getCfmName() == null) ? 0 : getCfmName().hashCode());
        result = prime * result + ((getCfmPhone1() == null) ? 0 : getCfmPhone1().hashCode());
        result = prime * result + ((getCfmPhone2() == null) ? 0 : getCfmPhone2().hashCode());
        result = prime * result + ((getCfmCustomerNeeds() == null) ? 0 : getCfmCustomerNeeds().hashCode());
        result = prime * result + ((getAge() == null) ? 0 : getAge().hashCode());
        result = prime * result + ((getSex() == null) ? 0 : getSex().hashCode());
        result = prime * result + ((getOccupation() == null) ? 0 : getOccupation().hashCode());
        result = prime * result + ((getLevel() == null) ? 0 : getLevel().hashCode());
        result = prime * result + ((getCfmDate() == null) ? 0 : getCfmDate().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode());
        result = prime * result + ((getUpdateDate() == null) ? 0 : getUpdateDate().hashCode());
        result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
        result = prime * result + ((getOperatorId() == null) ? 0 : getOperatorId().hashCode());
        result = prime * result + ((getOrganId() == null) ? 0 : getOrganId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", clueNo=").append(clueNo);
        sb.append(", name=").append(name);
        sb.append(", phone=").append(phone);
        sb.append(", customerNeeds=").append(customerNeeds);
        sb.append(", customerSuggestions=").append(customerSuggestions);
        sb.append(", cfmName=").append(cfmName);
        sb.append(", cfmPhone1=").append(cfmPhone1);
        sb.append(", cfmPhone2=").append(cfmPhone2);
        sb.append(", cfmCustomerNeeds=").append(cfmCustomerNeeds);
        sb.append(", age=").append(age);
        sb.append(", sex=").append(sex);
        sb.append(", occupation=").append(occupation);
        sb.append(", level=").append(level);
        sb.append(", cfmDate=").append(cfmDate);
        sb.append(", remark=").append(remark);
        sb.append(", status=").append(status);
        sb.append(", createDate=").append(createDate);
        sb.append(", updateDate=").append(updateDate);
        sb.append(", deleted=").append(deleted);
        sb.append(", operatorId=").append(operatorId);
        sb.append(", organId=").append(organId);
        sb.append("]");
        return sb.toString();
    }
}